package site.wanjiahao.handler.client;

import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import lombok.extern.slf4j.Slf4j;
import site.wanjiahao.message.response.GroupChartResponseMessage;

@ChannelHandler.Sharable
public class GroupChartResponseMessageHandler extends SimpleChannelInboundHandler<GroupChartResponseMessage> {

    @Override
    protected void channelRead0(ChannelHandlerContext ctx, GroupChartResponseMessage msg) throws Exception {
        System.out.println(msg.getGName() + "\n\t" + msg.getFrom() + ": " +  msg.getContent());
    }
}
